package com.wp.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.Value;

/**
 * @author: WangPeng
 * @createTime: 2022/11/19 19:03
 * @description:
 * @version: v1.0
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
//标记表名
@TableName(value = "t_user")
@ApiModel("用户对象")
public class User {

    //标记主键递增方式和主键的列名
    @TableId(type = IdType.AUTO,value = "uid")
    @ApiModelProperty(value = "用户id")
    private Integer id;

    @ApiModelProperty(value = "用户邮箱")
    private String email;

    //标记表中列名
    @TableField(value = "nike_name")
    @ApiModelProperty(value = "用户姓名")
    private String name;

    @ApiModelProperty(value = "用户密码")
    private String password;

    public User(String email, String name, String password) {
        this.email = email;
        this.name = name;
        this.password = password;
    }
}
